<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
<ui:define name="script">
<link href="./resources/css/style.css" rel="stylesheet" type="text/css" />
	<h:outputStylesheet library="css" name="style.css" />
	<h:outputScript library="primefaces" name="jquery/jquery.js" />		
	<script type="text/javascript">
	jQuery("#noteCol").click(function(e){
		alert('test');
	    var offset = jQuery(this).offset();
	    e.stopPropagation();                
	    jQuery("#result").text(this.id + "Offset: (" + offset.left + ", " + offset.top + "), " +
	                "Relative Coordinate: (" + (e.pageX - offset.left) + ", " + (e.pageY - offset.top) + ")");
	 
	    jQuery("#coordX").val(e.pageX - offset.left);
	    jQuery("#coordY").val(e.pageY - offset.top);
	 
	    jQuery("#button").click();
	});
	 
	jQuery("#button").click(function(e){
		alert('test');
		e.stopPropagation();
	    
	});
	</script>
	</ui:define>
</h:head>
<h:body>

<div id="result">Click an Element</div>
<div id="pdfCol">
    <h:form>
        <h:outputText value="#{note.test}"/>
        <p:commandButton actionListener="#{myBean.createNewInput}" value="Submit"/>  
        <!-- This button is to see when I click, whether the method inside managed bean get invoked. And it did. By looking at the log files.-->
    </h:form>
 
</div>
<div id="noteCol">
    <h:form>
        <h:inputText id="coordX"/>
        <h:inputText id="coordY"/>
        <h:commandButton id="button" />
    </h:form>
</div>
 
<script>

</script>
       
<h:outputText value="Ngày đặt *:" styleClass="textRight"/>
				<p:calendar value="4/12/2013" id="popupCal">
					<f:convertDateTime pattern="MM/dd/yyyy"/>
				</p:calendar>
</h:body>
</html>







<script>
		$('a[href="#tabView:tab2"]').click(setDataTab2);
		function btnDangKyClick(){
			dlg.show();
			setDataTab2();
		}
		function setDataTab2(){
			$('#tabView\\:formListQueue\\:tblQueue\\:phongMay').text($('#tabView\\:formRegister\\:cbxPhongMay option:selected').text());
			$('#tabView\\:formListQueue\\:tblQueue\\:tietHoc').text($('#tabView\\:formRegister\\:cbxTietHoc option:selected').text());
			$('#tabView\\:formListQueue\\:tblQueue\\:ngayDat').text($('#tabView\\:formRegister\\:popupCal_input').val());
			$('#tabView\\:formListQueue\\:tblQueue').val('#{lichDangKyBean.dsChoList}');
		}
	</script>